perm filename DO.RPH[UP,DOC] blob
sn#651095 filedate 1982-03-31 generic text, type T, neo UTF8
"DO" is a program which allows you to get a large amount of typing done
with a single command. Simple string variables are available for plugging
in filenames, etc.
For complete documentation, see the printed Monitor Command Manual, which is
online as MONCOM.BH[S,DOC], with updates in MONCOM.UPD[S,DOC].
Below are some examples not found in the Monitor Command Manual; these
use the extended commands (see descriptions in the Manual).
EXAMPLES OF EXTENDED DO
\;; This is a typical comment, delimited by semicolons;
\;; The following generates a string of six equivalence signs (≡'s);
≡≡\"≡\'36\=30\↑↑\?7
\;; Here we push the brick to get a filehack;
?\$ET \MAIL$POPBRICK.
\;; This would allow the user to (say) put downarrows around the
file name without having them turned into LFs by DO;
\PRINT."Filename, please: "\INPUT.F\INSERT.F
\;; The following uses macro output to reprint its input before DOing it;
\NEWLINE.\PRINT."Type something for me to DO: "\;; prompt user;
\INPUT.A\;; get do string;
\PUSHOUT.B\;; start output to B;
\"\NEWLINE.\"\PRINT.*OK, I will DO \;; set B to start of a print command;
\INSERT.A*\"\NEWLINE.\;; insert A, finish print command;
\POPOUT.\;; return to normal output;
?B\;; do print command;
?A\;; do input thing;
\;; The following is a short SAIL program, FOO.SAI.
The command DO FOO.SAI is equivelant to EXE FOO.SAI.
This works because \FLUSH. clears the initial SAIL
text and the | terminates the DO command.;
BEGIN "FOO"
COMMENT I am my own DO file ! ?\\\FLUSH.EXE FOO.SAI↔|;
PRINT("I am my own DO file !! ");
END "FOO"
\;; Note that together with labeled DO segments source files may
now contain easily used and maintained information about their
own compilation, loading etc. For example:
BEGIN "FOO"
COMMENT Some relevant DO functions follow:
(note "follow:" is NOT a label, nor is "SYS:" below)
|COMPILE:COM FOO.SAI↔|SAVE:LOAD FOO.REL/NOSAI/SAVE↔
|SYSTEM:REN SYS:←FOO.DMP↔|RUN:R FOO↔|;
PRINT("YOW!! I am having FUN!!");
END "FOO";
\;;The following is a DO file to avoid the intricacies of the one line FTP
(admitedly a trivial example). It does however demonstrate the use of
LOADED (by using the source file name as the default for the destination
file name). It also gives an example of putting a macro into a PRINT or
LOADED command.;
?\\\PRINT."Local file: "\INPUT.F\;; Prompt for local file name ;
\PRINT."Destination file name: "\;; Prompt for destination file name;
\PUSHOUT.T\;; Create a macro (to be executed) ;
\"\LOADED.'\INSERT.F';; that has the LOADED command ;
\POPOUT.?T\;; End the macro and execute it ;
\INPUT.D\;; Actually input the file name ;
FTP/A {SCORE↑}\INSERT.D←\INSERT.F\CR.\;;Issue the FTP command ;